package com.bcxj.servicedriveruser.controller;

import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.servicedriveruser.servcie.CityDriverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: CityDriverController
 * Package: com.bcxj.servicedriveruser.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/11/13 10:59
 * @Version 1.0
 * @Since 1.0
 */
@RestController
@RequestMapping("/city-driver")
public class CityDriverController {

    @Autowired
    private CityDriverService cityDriverService;


    /**
     * 查询城市是否有司机提供服务
     * @param cityCode
     * @return
     */
    @GetMapping("/is-alailable-driver")
    public ResponseResult<Boolean> isAlailableDriver(@RequestParam String cityCode) {
        return cityDriverService.isAlailableDriver(cityCode);
    }

}
